<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>档案管理系统</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/dist/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/dist/css/ionicons.min.css">
    <link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/static/dist/css/skins/all-skins.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-treeview.css">
    <link rel="stylesheet" href="/static/css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="/static/plugins/datepicker/datepicker3.css">
    <link rel="stylesheet" href="/static/layer/theme/default/layer.css">
    <link rel="stylesheet" href="/static/css/fileinput.min.css">
    <link rel="stylesheet" href="/static/webCss/daxxgmlpz.css?v=shujubuwqd12138">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/static/plugins/ie9/html5shiv.min.js"></script>
    <script src="/static/plugins/ie9/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue" style="font-size: medium">
<div class="content row" id="gmlpz">
    <div class=" col-xs-12">
        <div style="min-height: 800px">
            <!--<div class="box-header with-border">-->
                <!--<h3 class="box-title">档案信息根目录配置</h3>-->
            <!--</div>-->
            <!-- /.box-header -->
            <!-- form start -->
            <form role="form" id="daxxgmlpz">
                <div class="box-body row text-center">
                    <div class="form-group" style="padding: 84px;">
                        <label>输入根目录:</label>
                        <input  id="inputFile"  data-show-preview="false" name="files" v-model="path">
                        <p class="help-block" data-bv-validator="notEmpty" data-bv-for="gml" data-bv-result="INVALID"><span style="position: relative;
    right: 198px">根目录格式例如：D://dacl//xx</span></span></p>
                    </div>
                </div>
                <!-- /.box-body -->

                <div class="text-center" style="padding-top: 240px">
                    <button @click.prevent="mySubmit" type="submit" class="btn btn-primary" style="width: 96px;height: 34px;font-size:14px;font-family:PingFang SC;background-color: #2C72E8">确定</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<!-- Slimscroll -->
<script src="/static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="/static/plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="/static/dist/js/app.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="/static/dist/js/demo.js"></script>
<!--tabs-->
<script src="/static/dist/js/app_iframe.js"></script>
<script src="/static/js/bootstrap-treeview.js"></script>
<script src="/static/js/bootstrapValidator.min.js"></script>
<script src="/static/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="/static/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="/static/js/vue.js"></script>
<script src="/static/js/vue-resource.min.js"></script>
<script src="/static/layer/layer.js"></script>
<script src="/static/js/myJs.js?v=shujubuwqd12138"></script>
<script src="/static/js/fileinput.min.js"></script>
<script src="/static/js/zh.js"></script>
<script src="/static/js/newJs.js?v=shujubuwqd12138"></script>

<script type="text/javascript">
    newCss("/static/webCss/daxxgmlpz.css");
    var vue = new Vue({
        el:"#daxxgmlpz",
        data:{
            path:null

        },
        methods:{
            mySubmit:function () {
                //var  path=vue.$data.path;
                vue.$data.path = encodeURIComponent(vue.$data.path);
                this.$http.post('/updatePath?path='+this.path).then(function (result) {
                    var data = result.body;
                    if (data.code == 200) {
                        cxAlertOk("配置成功");
                        vue.$data.path = null;
                    }else {
                        cxAlert(data.mess);
                    }
                });
            }
        },
        mounted:function () {
            $('#daxxgmlpz').bootstrapValidator({
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                    files: {
                        validators: {
                            stringLength: {
                                max: 150,
                                message: '根目录路径字段长度不能超过150'
                            }
                        }
                    }
                }
            });
        }
    })
    // function browseFolder() {
    //     try {
    //         var Message = "请选择路径";  //选择框提示信息
    //         var Shell = new ActiveXObject("Shell.Application");
    //         var Folder = Shell.BrowseForFolder(0, Message, 64, 17);//起始目录为：我的电脑
    //         if (Folder != null)
    //         {
    //             Folder = Folder.items();  // 返回 FolderItems 对象
    //             Folder = Folder.item();  // 返回 Folderitem 对象
    //             Folder = Folder.Path;   // 返回路径
    //             if (Folder.charAt(Folder.length - 1) != "\\")
    //             {
    //                 Folder = Folder + "\\";
    //             }
    //             document.getElementById("catchAdress").value=Folder；
    //         return Folder;
    //         }
    //     }
    //     catch (e)
    //     {
    //         alert(e.message);
    //     }
    // }
    </script>
</body>
</html>
